package org.liao.springboot.webservice.rs.cxf;

import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
import org.apache.cxf.jaxrs.client.JAXRSClientFactory;

import java.util.stream.Collectors;
import java.util.stream.Stream;

public class RsClient {
    public static void main(String[] args) {
        JacksonJsonProvider jsonJsonProvider = new JacksonJsonProvider();
        HelloService helloService = JAXRSClientFactory.create("http://localhost:8080/services/helloservice"
                , HelloService.class
                , Stream.of(jsonJsonProvider).collect(Collectors.toList())
        );
        RespObject s = helloService.sayHello("1111");
        System.out.println(s);
    }
}
